package cn.edu.hbvtc.qms.persist.hibernate;

import java.util.List;

import cn.edu.hbvtc.qms.domain.Category;
import cn.edu.hbvtc.qms.domain.Criteria;
import cn.edu.hbvtc.qms.persist.ICategoryDao;

public class HibernateCategoryDao extends HibernateAbstractDao<Category, Integer>
		implements ICategoryDao {

	private static final long serialVersionUID = 1L;

	public HibernateCategoryDao() {
		super(Category.class);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Category>findCategorysOfCriteria(int criteriaId) {
		return this.getHibernateTemplate().find("from Category c where c.criteria.id = ?",criteriaId );
	}
	
}
